//
//  BiBaseViewController.h
//  CodoonBikeApp
//
//  Created by ChenBin on 14-3-28.
//  Copyright (c) 2014年 Nahan Cop. All rights reserved.
//

#import "BiNaviBarView.h"
#import "BiNetEngine.h"
#import "Bi_MBProgressHUD.h"
#import "ASIHTTPRequest.h"
#import "JSONKit.h"
@class BiNavMenuView;

@interface BiBaseViewController : UIViewController
{
    // 针对IOS7来用的
    int _topMargin;
    
    BiNaviBarView * _naviBarView;
    
    Bi_MBProgressHUD *HUD;
}

- (void)sethttpRequestFormat:(NSString *)address Tag:(int)tag Data:(NSData *)data;
- (NSString *)sendJson:(NSDictionary *)dictionary;
- (void)requestFinished:(ASIHTTPRequest *)request;


- (int)viewTop;

- (void)addTestView;

- (void)setNavBarWithHidden:(BOOL)hidden;
- (void)setNavBarTitle:(NSString *)title;
- (void)setNavBarTitleImage:(UIImage*)image;
- (void)setNavBackBtn;
- (void)setNavLeftButton:(UIImage *)icon target:(id)target action:(SEL)action;
- (void)setNavRightButton:(UIImage *)icon target:(id)target action:(SEL)action;
- (void)setNavRightButtonTitle:(NSString*)title target:(id)target action:(SEL)action;
- (void)removeNavRightBtn;

- (void)showMessage:(NSString *)message;
- (void)showTipsView:(NSString*)tipText;
- (void)removeTipsView;
- (void)showAlertView:(NSString*)tipText;

- (void)onAlertViewOkBtnClick;

- (BOOL)isConnectToNetwork;

/**
 *  显示等待框
 *
 *  @param title          显示文字
 *  @param viewController 在viewcontroller显示(self)
 */
- (void)asyshowHUDView:(NSString *)title CurrentView:(UIViewController *)viewController;

/**
 *  移除等待框
 *
 *  @param viewcontroller self
 */
- (void)removeHUDView:(UIViewController *)viewcontroller;


@end
